<template>
<div id="mains">
    <header class="we-header">
        <i class="fa fa-chevron-left" @click='$router.push("/home")'></i>
        <h3>weibo page</h3>
    </header>
    <div class="api-url">name
        <count-down :countTime='countTime'></count-down>
        <count-down2 :endTime="endTime" :callback="callback" endText="已经结束了"></count-down2>
    </div>
    <div id="contents" class="animate">
        <ul>
            <li>
                <count-down3></count-down3>
            </li>
            <li v-for="item in 10" :key="item">
				<a href="javascript:;" @click="handleRecharge(item)">{{item*10}}</a>
			</li>
        </ul>
    </div>
</div>
</template>

<script>
import CountDown from "../../CountDown"
import CountDown2 from '../../CountDown2'
import CountDown3 from '../../CountDown3'
export default {
    name: "weibo",
    data() {
        return {
            countTime: {
                minute: 30,
                second: 0
            },
            endTime: String((new Date().getTime())/1000+5000),
            callback() {
                return;
            }
        }
    },
	methods: {
		handleRecharge(num) {
			num*=10
			this.axios.get("/user/upgradeMember?username="+this.$store.state.user.username+"&money="+num).then(res => {
				if(res.data.status === 200) {
					console.log(res.data)
				} else if(res.data.status === 400) {
					alert(res.data.code)
				}
			})
		}
	},
    components: {
        CountDown,
        CountDown2,
        CountDown3
    }
}
</script>

<style scoped>
#mains {
    margin-bottom: 0;
    background-color: #d4e3f8;
}
#mains .we-header {
    position: relative;
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    width: 100%;
    border-bottom: 1px solid #b3b2b2;
    background-color: #54ffe8;
    text-align: center;
    box-shadow: 0 2px 6px #b3b2b2;
}
#mains .we-header>i {
    position: absolute;
    top: 0;
    left: 0;
    width: 50px;
    height: 50px;
    line-height: 50px;
    background-color: #b7eeff;
}
#mains .we-header>i:hover {
    background-color: #59d8ff;
}
#mains .we-header>h3 {
    width: 100%;
    height: 50px;
    line-height: 50px;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    padding-left: 50px;
    padding-right: 50px;
}
#mains .api-url {
    min-height: 40px;
    line-height: 20px;
    margin-top: 5px;
    padding: 5px 15px;
    border: 1px solid #acacac;
    box-shadow: 0 0 6px #8f8e8e;
    border-radius: 10px;
    word-wrap: break-word;
}
#contents {
    margin-bottom: 0;
}
#contents ul {
    word-wrap: break-word;
    padding: 0 10px 5px;
}
#contents ul li {
    padding: 10px;
    margin-top: 10px;
    border: 1px solid #62c3ff;
    border-radius: 5px;
    box-shadow: 0 0 4px #11a4ff;
	text-align: center;
}
</style>